Using the Command Line BIC in a Process Flow

The following diagram illustrates how the Command Line BIC acts in a process flow. (The numbers denote the order in which events occur.)

To configure a Command Line BIC activity in a flow, open the flow editor to the Process Flow Modeler tab and proceed as follows:

  1. Click the activity icon to place an automatic activity on the flow canvas.
  2. Click the flow canvas and the BIC Selection dialog box appears.
  3. Select Command Line BIC and then click OK.
  4. Double-click the Command Line BIC activity icon to open the Command Line BIC editor. You can also right-click the HTTP BIC activity icon and then click Properties in the shortcut menu.

Using the Command Line BIC Editor

The editor’s tabs are described in the following table.

Tab Name

Description of functions

General

Assign a name (required) and a description (optional) for the activity.

Details

Set a new work item priority if needed. Configure the BIC to send the work item to the next activity in the flow in the event that the BIC encounters an error. Specify which BIC Manager should be used, if the default is not sufficient. Indicate how the BIC should persist properties. Indicate the work item key that you will use to obtain the actual send date and/or time. Select or modify the format of the date by either choosing one from the list or entering an alternative.

Expiration

Specify whether the expiration should occur after a specific period, or whether the expiration should occur after a specific date and time. You can set the work item’s expiration period by entering values, either by typing or by clicking the up and down arrows or indicate the work item key that you will use to obtain the actual send date and/or time. Select or modify the format of the date by either choosing one from the list or entering an alternative. An e-mail can be sent to a designated participant, or the work item can be sent on to the next activity.

Settings

Specify a script file for the BIC to use, and specify any properties from the hash table of work item to be used by the script file.

Custom Action

Indicate the fully qualified class name in the Send Action Class field to have a work item perform actions or tasks before sending the work item to the next activity. Specify additional property keys and values that you want to use during run-time.

General Tab

The General tab contains the following fields:

  • Name – provide a name for the Command Line BIC activity. If you do not specify a name, EPX assigns a default name for the activity such as Automatic Activity (1) or Automatic Activity (3).
  • Description – add other information on the BIC activity, if desired.

To save the data entered and proceed to another tab, click Apply. Clicking OK will also save the data entered and exit the Command Line BIC editor. To cancel saving the data entered, click Cancel.

Details Tab

The Details tab allows the user to set the following options:

  • Work Item Priority – Specify which work item will be prioritized by selecting a work item from the Work Item Priority dropdown list. The new priority takes effect when a work item arrives at the Command Line BIC activity. The priority you select overrides any previously established priorities for work items. For an explanation of work item priorities and the available options, see the Process Modelingguide.
  • Send work item on error – When the BIC encounters an error with a work item, you can have the BIC activity forward the work item to the next activity in the flow by enabling this option. Click the Send work item on error checkbox to enable this option.
  • Note: This option is typically used during the creation of a new process flow and allows users to test all activities in the flow for errors. If the option is not selected and an error occurs with the BIC, the work item will remain in the BIC’s Inbox.

    To test a BIC activity using the Send work item on error option, you can use the Generic work items viewer for the activity following the BIC, at least until the BIC activity is functioning successfully. The Generic work item viewer allows you to view any error messages generated at the BIC activity. When the process flow is ready for actual use, deselect this option.

  • BIC Manager – By default, the system determines which BIC Manager executes the BIC activity. You can override this by selecting a BIC Manager from the BIC Manager dropdown list.
  • Persist Properties – The default persist properties setting for all activities in process flows running in the local iteration of EPX’s Application Server is controlled on the Server editor’s Details tab. To change the persist properties settings for the Command Line BIC activity, select a setting from the Persist Properties dropdown list. The settings are the following:
    • Default – Select this setting to enable the default persist properties setting for the local iteration of EPX Application Server.
    • No – Select this setting to turn off the persist properties function.
    • Yes – Select this setting to always persist properties.
  • To track changes to a work item as it passes from one actor to the next in a process flow, the properties of a work item version can be recorded or persisted in an actor’s Sentbox.

  • Delayed Send – Users can specify if the work item is not to be sent to the next activity immediately by clicking the Delayed Send checkbox. When you enable the Delayed Send option, you must specify the following:
    • Work Item Key – The key you will use to get the actual send date and/or time during runtime. In this example, type in "DelayedSend.Date" wherein DelayedSend is the work item type you created and Date is the string field in the work item type. You can also use the custom code in a class specified in the Send Action Class field on the Custom Action tab to set the delayed send time.
    • Date Format – The default format isMM dd yyyy HH:mm. Select a date format from the Date Format dropdown list or enter values in the combo box.
    • Format Test – This field displays the current date and/or time formatted using the format selected in the Date Format field. Each time a new format is selected, this value is updated to reflect the newly selected format. Refer to the Appendix for the available date formats and time zones.

To save the data entered and proceed to another tab, click Apply. Clicking OKwill also save the data entered and exit the Command Line BIC editor. To cancel saving the data entered, click Cancel.

Note : The Starting Point checkbox and Default Work Item Name field are disabled because the Command Line BIC cannot be set as a starting point.

Expiration Tab

The Expiration tab is used to specify how long a work item can remain at the Command Line BIC activity and what will happen to the work item if that period is exceeded. Setting an expiration period is optional, but should an error occur with the BIC Manager, an expired Command Line BIC activity will indicate that the BIC Manager was unavailable for a time longer than the expiration period.

To enable work item expiration:

  1. Click the Expiration Period checkbox.
  2. Specify when the expiration should occur by clicking any of these options:
    • Specific Period– If the expiration is set to Specific Period, set the amount of time until work item expiration by entering values in Days,Hours, Minutes, and Seconds fields. You can manually enter the values or click the up and down arrows to fill out the fields. Make sure that at least one of the four fields should be filled out.
    • The Seconds value must be at least 15 seconds. Setting an expiration period less than 60 seconds will cause delay in the actual work item expiration period because, by default, the Control Manager checks for expired work items every 60 seconds. The expiration polling interval can be reduced by modifying the value of the control.expiredWorkItem.interval setting in <EPX>\bin\config.properties (in the Control Manager Properties section), but before doing so you should consider the impact that this change will have on the performance of your system.

    • Dynamic Date - If the expiration is set to Dynamic Date, you will need to provide the following:
      • Work Item Key – The key you will use to get the actual send date and/or time during runtime. For example, type in "DynamicExpiration.Date" if the expiration date is designated by the Date field of the DynamicExpiration work item type in the work item.
      • · Date Format – The default format isMM dd yyyy HH:mm. Select your desired date format from the Date Format dropdown list or enter values in the combo box.
      • Format Test – Contains the current date and/or time formatted using the format selected in the Date Format field. Each time a new format is selected, this value is updated to reflect the newly selected format. Refer to Appendix for the available date formats and time zones.

Instead of setting the expiration date by specifying a work item key, a send action class can be used to set that date. Click the Custom Action tab and enter the fully qualified class name for the custom code in the Send Action Class field.

After filling out the necessary fields, proceed to the next step.

  1. Click the Send Work Item checkbox to automatically send the work item to the next activity in the flow upon expiration.

Note : The work item cannot go to another point in a flow that needs manual intervention to select a participant. For example, the work item can go to an All split to specify that all participants receive the work item following the split. If it is a Some or a One split, however, manual intervention is required to choose a participant.

  1. Click the Send E-mail checkbox to automatically notify one or more participants, groups, or roles should the activity expire. When you select the Send E-mail checkbox, the E-mail table is enabled. Use the E-mail table to add e-mail recipients. To add e-mail recipients, select one or more recipients from the E-mail address selection dialog. For more information about the Expiration tab, see the Process Modeling guide.
  1. Save the data entered and proceed to another tab by clicking Apply. Clicking OK will also save the data entered and exit the Command Line BIC editor. To cancel saving the data entered, click Cancel.

Settings Tab

The Settings tab contains the Script File Location and Result Set boxes and the property hash parameters table.

To add parameters to the property hash table:

  1. In the Script File Location field, specify the path to the script file by clicking the Browse button and selecting the script file from the File dialog box or by typing the script file path.

Note : When the BIC is used in a clustered environment, make sure that the folders and/or script files that will be indicated are existing in and pointing to where the BIC Manager server is installed.

  1. In the Result Set box, enter the name for the executed Command Line BIC activity’s result set. A result set is a string that stores the output of the executed script. You would see this same output onscreen if you were manually executing the script in the operating system shell.

    The result set name and its output string are a key/value pair. The result set string can be viewed by adding its key to a work item viewer.

    Important: Result set names should not include spaces, or characters other than A-Z, a-z, 0-9, and the underscore character ( _ ).

  2. Click Addto enter parameter keys and values into the property hash parameters table. In the table cells that appear, type the name of the first key used by the script file, followed by its value. The value can be a Process Exchange work item variable or constant, a Process Exchange system variable or constant, or a constant that you choose yourself. Repeat this procedure for each key in the script file.

Note : If your script writes a file and you want to preserve each written file, you must include a string that gives each new file a unique name. Otherwise, each time the process flow is started, the previous file will be overwritten. You can use any replaceable parameter that returns a unique value. You can have Process Exchange create a unique name for each file by using the Process Exchange system parameter %sys.workitem.version.uid%.

  1. Save the data entered and proceed to another tab by clicking Apply. Clicking OKwill also save the data entered and exit the Command Line BIC editor. To cancel saving the data entered, click Cancel.

Custom Action Tab

The Customs Action tab allows users to set the Delayed Send and Expiration Date by custom code in a specified class. You can use custom code to have a work item perform certain actions or tasks before sending the work item to the next activity. Refer to the section “Customizing Send Action Class,” found in the Process Modeling guide for detailed instructions on how to create a custom code.

To set the Delayed Send and Expiration period by custom code:

  1. Enter the fully qualified class name in the Send Action Class field.

The Send Action Class field is only available for the following EPX activities: Manual, Automatic, Anonymous, Iteration, Work Item Purge, and Decision Point. This would mean that the Send Action Class field can function independently and can be used without the Dynamic Date or Date Expiration feature.

Note : The Send Action Class field on the Custom Action tab or the Work Item Key field on the Details and Expiration tabs must have valid entries if Delayed Send or Dynamic Date is selected.

  1. Specify additional property keys and values that you want to pass to the custom code identified by the Send Action Class or the Custom Expiration Handler, if one has been installed. You can add an entry to the list by right clicking anywhere in the key-value region and then clicking Add.
  2. Type in the name and value of the activity in the Activity Property window.
  3. Save the data entered and proceed to another tab by clicking Apply. Clicking OK will also save the data entered and exit the Command Line BIC editor. To cancel saving the data entered, click Cancel.